<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>

<!-- 引入基础的css和js -->
<link rel="import" href="../material/import.html" id="import"/>
<!--<script src="../assets/lib/jquery.1.12.4.min.js"></script>-->
<link rel="stylesheet" href="../assets/plugins/jquery-layout/jquery.layout-latest.css" />
<script src="../assets/plugins/jquery-layout/jquery.layout-latest.js"></script>
<link rel="stylesheet" href="../assets/plugins/layui/css/modules/layer/default/layer.css" />
<!--<link rel="stylesheet" href="../material/css/ry-ui.css" />-->
<link >
<script>
var permissionType={
	add:"sysbasedata:save",update:"sysbasedata:update",delete:"sysbasedata:delete",
	submit:"sysbasedata:submit",auditpass:"sysbasedata:auditpass",auditnopass:"sysbasedata:auditnopass"	
};
</script>

<style>
	.search-collapse, .select-table {
		width: 100%;
		background: #fff;
		border-radius: 5px;
		padding-top: 5px;
		/*margin-top: 10px;

		padding-bottom: 13px;
		box-shadow: 1px 1px 3px rgba(0,0,0,.2);*/
	}*

		 /*.search-collapse {
			 position: relative;
		 }

		 */
	 body {
		 background-color: #fff0;
	 }

	.fixed-table-body {
		background: #eaf1f5;
	}

	.btn-primary {
		background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #26c6da), color-stop(1, #26c6da));
	}

	.btn-success {
		background-color: #1c84c6;
		border-color: #1c84c6;
		color: #FFFFFF;
	}

	.card-body {
		-webkit-box-flex: 1;
		-ms-flex: 1 1 auto;
		flex: 1 1 auto;
		padding: 1.25rem;
	}

	.box-main {
		margin: 0;
		border: 0;
		padding-top: 2px;
		border-radius: 0;
		box-shadow: none;
	}

	.box-main {
		margin: -10px;
		border: 0;
		padding-top: 2px;
		border-radius: 0;
		box-shadow: none;
	}

	.box {
		position: relative;
		/* border-radius: 3px; */
		background: #ffffff;
		border-radius: 9px;
		/* border-top: 3px solid #d2d6de; */
		/* margin-bottom: 20px; */
		width: 100%;
		/* box-shadow: 0 1px 1px rgba(0,0,0,0.1); */
	}

	.box-main>.box-header {
		border-bottom: 5px solid #eaf1f5;
		padding: 12px 10px 10px 25px;
	}

	.ui-layout-west {
		/* background-color: #435b87; */
		padding: 8px 0px 0px 8px;
	}
	.ui-layout-resizer {
		background: #eef5f9;
		border: 1px solid #eef5f9;
		border-width: 0;
	}

	.ui-layout-toggler {
		border: 1px solid #fff;
		background-color: #fff;
		border-radius: 5px;
	}



</style>
</head>
<body>
	
<div id="westApp" class="ui-layout-west">
	<west-layout tip="字典类型4">
		<rojao-tree id="testabcd" idkey="typeId" pidkey="parentId" rootpid="-1" displayname="baseTypeName" checkable=true
	            	:url=$path+"/sys/sysbasedatatype/treeList" @click="click" v-model="sysBaseData.abc"></rojao-tree>
	</west-layout>
</div>

<div class="ui-layout-center">
<div id="app" v-cloak >

    <!-- 列表显示区间 start -->
	<div v-show="showList">	     	    
	    <!-- 查询块 start -->
	     <search-component>	                    
                 <search-input v-model="search.baseName" :field="sysBaseDataField.baseName" ></search-input>
                 <search-input v-model="search.type" :field="sysBaseDataField.type" ></search-input>
				 <search-submit :field="pageData.query" @searchsubmit="query"></search-submit>
		 </search-component>	          
	    <!-- 查询块 end -->

		<div class="col-sm-12 search-collapse">
	   <!-- 列表table显示 start -->	
		<permission @add="add" @update="update" @del="del" @submit="audit(1)" @auditpass="audit(2)" @auditnopass="audit(3)"></permission>
	    <table id="table"></table>
	    <!-- 列表table显示end -->
		</div>
	</div>
    <!-- 列表显示区间 end -->
	
	<!-- 编辑内容显示区间 start -->
    <div v-show="!showList">
	    <defaultform  :title="title" @reload="reload" @submit="saveOrUpdate">
                <rojao-input :field="sysBaseDataField.baseName" name="baseName" v-model="sysBaseData.baseName" :placeholder="sysBaseDataField.baseName" ></rojao-input>		
                <!--<myframe-input :field="sysBaseDataField.baseType" name="baseType" v-model="sysBaseData.baseType" :placeholder="sysBaseDataField.baseType" ></myframe-input>
                <myframe-input :field="sysBaseDataField.status" name="status" v-model="sysBaseData.status" :placeholder="sysBaseDataField.status" ></myframe-input>-->
                <rojao-input :field="sysBaseDataField.type" name="type" v-model="sysBaseData.type" :placeholder="sysBaseDataField.type" ></rojao-input>		
                <rojao-input :field="sysBaseDataField.key" name="key" v-model="sysBaseData.key" :placeholder="sysBaseDataField.key" ></rojao-input>		
                <rojao-input :field="sysBaseDataField.value" name="value" v-model="sysBaseData.value" :placeholder="sysBaseDataField.value" ></rojao-input>		
                <!--<myframe-input :field="sysBaseDataField.language" name="language" v-model="sysBaseData.language" :placeholder="sysBaseDataField.language" ></myframe-input>-->
                <rojao-select :field="sysBaseDataField.language" name="language" v-model="sysBaseData.language" :list="baseData.LANGUAGE"></rojao-select>
                <rojao-textarea :field="sysBaseDataField.describe" name="describe" v-model="sysBaseData.describe"></rojao-textarea>	 
	    </defaultform>
	</div>
	<!-- 编辑内容显示区间 end -->	    
</div>
</div>
<script src="../sys/js/sysbasedata.js"></script>
<script>
	var westVm = new Vue({
			el:'#westApp',
			data:{
				sysBaseData: {	
						
				}
			},
			methods: {
				click: function(treeNode){
					//console.log(treeNode);
					vm.search.type = treeNode.baseTypeKey;
					//vm.sysBaseData.type = treeNode.baseTypeKey;
					baseDataType = treeNode.baseTypeKey;
					defaultActions.query();
					//vm.sysBaseData.abc=westVm.sysBaseData.bac;
				}
			}
	});	
	
	$(document).ready(function () {
		$('body').layout({ applyDefaultStyles: false ,
			spacing_open:5,
			spacing_close:5,
			onclose_end : function(){
				$('#table').bootstrapTable('resetView');
			},
			onopen_end : function(){
				$('#table').bootstrapTable('resetView');
			},
			
		});
	});
</script>

</body>
</html>